package com.ruoyi.his.service.impl;

import com.ruoyi.his.domain.TMedicalDrugsPharmacy;
import com.ruoyi.his.domain.vo.TMedicalDrugsPharmacyVo;
import com.ruoyi.his.mapper.TMedicalDrugsPharmacyMapper;
import com.ruoyi.his.service.ITMedicalDrugsPharmacyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 药房Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-09-10
 */
@Service
public class TMedicalDrugsPharmacyServiceImpl implements ITMedicalDrugsPharmacyService
{
    @Autowired
    private TMedicalDrugsPharmacyMapper tMedicalDrugsPharmacyMapper;

    /**
     * 查询药房
     * 
     * @param pharmacyid 药房主键
     * @return 药房
     */
    @Override
    public TMedicalDrugsPharmacy selectTMedicalDrugsPharmacyByPharmacyid(Long pharmacyid)
    {
        return tMedicalDrugsPharmacyMapper.selectTMedicalDrugsPharmacyByPharmacyid(pharmacyid);
    }

    /**
     * 查询药房列表
     * 
     * @param tMedicalDrugsPharmacy 药房
     * @return 药房
     */
    @Override
    public List<TMedicalDrugsPharmacyVo> selectTMedicalDrugsPharmacyList(TMedicalDrugsPharmacyVo tMedicalDrugsPharmacy)
    {
        return tMedicalDrugsPharmacyMapper.selectTMedicalDrugsPharmacyList(tMedicalDrugsPharmacy);
    }

    /**
     * 新增药房
     * 
     * @param tMedicalDrugsPharmacy 药房
     * @return 结果
     */
    @Override
    public int insertTMedicalDrugsPharmacy(TMedicalDrugsPharmacy tMedicalDrugsPharmacy)
    {
        return tMedicalDrugsPharmacyMapper.insertTMedicalDrugsPharmacy(tMedicalDrugsPharmacy);
    }

    /**
     * 修改药房
     * 
     * @param tMedicalDrugsPharmacy 药房
     * @return 结果
     */
    @Override
    public int updateTMedicalDrugsPharmacy(TMedicalDrugsPharmacy tMedicalDrugsPharmacy)
    {
        return tMedicalDrugsPharmacyMapper.updateTMedicalDrugsPharmacy(tMedicalDrugsPharmacy);
    }

    /**
     * 批量删除药房
     * 
     * @param pharmacyids 需要删除的药房主键
     * @return 结果
     */
    @Override
    public int deleteTMedicalDrugsPharmacyByPharmacyids(Long[] pharmacyids)
    {
        return tMedicalDrugsPharmacyMapper.deleteTMedicalDrugsPharmacyByPharmacyids(pharmacyids);
    }

    /**
     * 删除药房信息
     * 
     * @param pharmacyid 药房主键
     * @return 结果
     */
    @Override
    public int deleteTMedicalDrugsPharmacyByPharmacyid(Long pharmacyid)
    {
        return tMedicalDrugsPharmacyMapper.deleteTMedicalDrugsPharmacyByPharmacyid(pharmacyid);
    }
}
